﻿// 企业信息
function getLoginInfo(){
	
	$.ajax({
        type: "POST",
        url: contextPath + "/view/baseConfig/getLoginInfo",
        dataType: "html",
        data: {},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
	
}


/**
 * 获取部门列表
 */
function getDepartments(){
	
	$.ajax({
        type: "POST",
        url: contextPath + "/view/baseConfig/depts",
        dataType: "html",
        data: {},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
	
}



/**
 * 获取员工列表
 */
function getUserList(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/baseConfig/users",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}




/**
 * 获取数据据字典
 */
function getDictionary(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/baseConfig/getDictionary",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}




/**
 * 获取物品分类
 */
function getCategorygoods(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/baseConfig/getCategorygoods",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}




/**
 * 获取物品信息
 */
function getProductinfos(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/baseConfig/getProductinfos",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}




/**
 * 获取往来单位分类
 */
function getCategorycompany(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/baseConfig/getCategorycompany",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}



// 往来单位信息
function getCompanies(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/baseConfig/getCompanies",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}




/**
 * 获取品牌维护
 */
function getBrand(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/baseConfig/getBrand",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}


/**
 * 获取所有审批项
 */
function getApprovalOptions(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/baseConfig/getApprovalOptions",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}


